﻿using System;
using MyHealthByDesign.Domain;

namespace MyHealthByDesign
{
    public partial class SiteMaster : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if(Session["User"]!= null)
            {
                User user = (User) Session["User"];
                lblUser.Text = user.Firstname;
                lnkLogout.Text = "[LogOut]";
            }
            else
            {
                lblUser.Text = string.Empty;
            }
            
        }

        protected void lnkLogout_Click(object sender, EventArgs e)
        {
            Session["User"] = null;
            Response.Redirect("../Default.aspx");
        }
    }
}
